@import "./var.scss";

.personal-page {
  padding-bottom: 20px;
  .wrapper {
    overflow: hidden;
    &+.pagination{
      padding: 0 20px;
    }
  }
  .nav,
  .content {
    float: left;
  }
  .nav {
    width: 200px;
    ul {
      margin: 0;
      padding: 0;
      background-color: #fff;
    }
    li {
      padding: 15px 0;
      border-bottom: 1px solid #eaeaea;
    }
    a {
      position: relative;
      display: block;
      height: 30px;
      line-height: 30px;
      font-size: 16px;
      color: #666;
      text-align: center;
      &:hover {
        color: $mainColor;
        cursor: pointer;
      }
      &.active{
        color: $mainColor;
        &::before{
          content: '';
          position: absolute;
          left: 0;
          top: -2px;
          width: 3px;
          height: 34px;
          background-color: $mainColor;
        }
      }
    }
  }
  .content {
    width: 950px;
    padding: 15px 25px;
    margin-left: 30px;
    background-color: #fff;
  }

  .order-content,
  .coupon-content{
    .filters {
      box-shadow: 0px 3px 5px 1px #eee;
      li {
        position: relative;
        display: inline-block;
        width: 60px;
        margin: 0 48px;
        line-height: 42px;
        text-align: center;
        &:hover {
          cursor: pointer;
          color: $mainColor;
        }
        &.active {
          color: $mainColor;
          &::before {
            content: "";
            position: absolute;
            left: 0;
            bottom: 0;
            width: 60px;
            height: 3px;
            background-color: $mainColor;
          }
        }
        &::after {
          content: "";
          position: absolute;
          right: -48px;
          bottom: 10px;
          width: 1px;
          height: 20px;
          background-color: #eaeaea;
        }
        &:last-child{
          &::after{
            width: 0;
          }
        }
      }
    }
    .filters-list {
      padding: 15px 10px;
    }
    .empty {
      padding: 125px 0;
    }
  }
  // 我的订单
  .order-content {
    .item {
      position: relative;
      height: 160px;
      padding-top: 5px;
      margin-top: 15px;
      transition: all 0.3s;
      overflow: hidden;
      &.all{
        .item-num{
          top: 32px;
        }
      }
      &:first-child{
        margin-top: 0;
      }
      &:hover{
        transition: all 0.3s;
        transform: translateY(-4px);
        box-shadow: 2px 2px 10px 3px rgb(0 0 0 / 10%);
      }
      .item-cnt {
        position: relative;
        padding: 5px 60px 5px 250px;
        h3 {
          max-height: 30px;
          margin-bottom: 5px;
          line-height: 1.4;
          font-size: 18px;
          color: #333;
          overflow: hidden;
          &:hover {
            cursor: pointer;
            color: $mainColor;
          }
          & + p {
            margin-bottom: 13px;
            color: #444;
          }
        }
        & > p {
          margin-bottom: 3px;
          color: #777;
        }
      }
      .item-bottom {
        width: 610px;
        position: absolute;
        bottom: 8px;
        left: 250px;
        overflow: hidden;
        color: #777;
        & > span,
        & > em {
          color: $priceColor;
        }
        & > em {
          font-size: 24px;
          font-weight: 600;
        }
        & > button {
          float: right;
          margin: 3px 0 0 10px;
          padding: 3px 12px;
          background-color: #fff;
          border: 1px solid #ccc;
          font-size: 12px;
          color: #999;
          cursor: pointer;
          &.buy,
          &.pay {
            border-color: $mainColor;
            &:hover{
              opacity: 0.85;
            }
          }
          &.buy {
            color: $mainColor;
          }
          &.pay {
            background-color: $mainColor;
            color: #fff;
          }
          &:hover:not(.pay) {
            color: #888;
            border-color: #aaa;
          }
        }
      }
      img,
      .item-num {
        position: absolute;
        z-index: 9;
        top: 0px;
        height: 160px;
      }
      .item-status{
        position: absolute;
        z-index: 10;
        left: -24px;
        top: 14px;
        width: 100px;
        height: 26px;
        line-height: 24px;
        text-align: center;
        color: #fff;
        background-color: $priceColor;
        transform: rotate(-45deg);
      }
      .item-num {
        width: 50px;
        height: 80px;
        line-height: 80px;
        right: 5px;
        top: 18px;
        color: #999;
        font-size: 14px;
        text-align: center;
      }
      img {
        left: 0;
        width: 230px;
        cursor: pointer;
      }
    }
  }
  // 评价/意见反馈
  .feedback-content,
  .comment-content{
    .max-feedback,
    .max-comment{
      width: 650px;
      &>h3{
        margin: 10px 0 20px;
        font-size: 20px;
      }
    }
    .form-item{
      padding: 10px 0;
      &>button{
        width: 104px;
      }
      &>div{
        &:first-child{
          margin-bottom: 5px;
        }
      }
      &>p{
        margin-bottom: 7px;
      }
      ul{
        span{
          font-size: 30px;
        }
      }
      a>span{
        display: none;
      }
    }
    .form-item-rate{
      margin-left: 30px;
      color: $mainColor;
    }
    
  }
  .feedback-content{
    div>label{
      width: 120px;
      color: #888;
      &>span+span{
        padding-left: 5px;
      }
    }
  }
  // 个人资料
  .my-info-content{
    padding-top: 35px;
    .max-my-info{
      width: 480px;
    }
    .form-item{
      position: relative;
      margin-bottom: 25px;
      padding-bottom: 25px;
      border-bottom: 1px dashed #ccc;
      &:last-child{
        border-bottom: none;
        margin-bottom: 0;
      }
      &>label{
        position: absolute;
        left: 0;
        width: 80px;
        color: #A0A0A0;
      }
      &>div{
        padding-left: 80px;
        label{
          span+span{
            padding-left: 5px;
          }
        }
      }
      img{
        height: 60px;
        width: 60px;
        border-radius: 100%;
      }
      form{
        margin-top: 10px;
        padding: 16px 70px 6px 20px;
        background-color: #F5F5F5;
        border-radius: 5px;
        button+button{
          margin-left: 15px;
        }
        button[disabled]{
          background-color: #ddd;
        }
      }
      .merge{
        display: inline-block;
        width: 65%;
        &+.merge{
          width: 35%;
          text-align: right;
          button{
            width: 100px;
          }
        }
      }
      .operate{
        float: right;
        color: $mainColor;
        &:hover{
          cursor: pointer;
          opacity: 0.85;
        }
        &+input{
          width: 0;
          height: 0;
          opacity: 0;
        }
      }
      .cascader{
        width: 100%;
        &>span{
          padding: 0;
        }
        input{
          padding: 0;
        }
      }
    }
  }
} 
// 优惠券
.coupon-content{
  &.popover{
    .item{
      &.not-used,
      &.used,
      &.expire{
        .center{
          width: 460px;
        }
      }
      .left{
        width: 200px;
      }
      .center{
        width: 350px;
      }
    }
  }
  .item{
    position: relative;
    height: 130px;
    background-color: #F9F9F9;
    &+.item{
      margin-top: 15px;
    }
    &:hover{
      box-shadow: 1px 1px 8px 0px rgb(0 0 0 / 10%);
    }
    &.ty{
      .left{
        background: linear-gradient(90deg,#5596f2,#647ae9);
      }
    }
    &.used,
    &.expire{
      background-size: 80px;
      background-position: right;
      background-position-x: 92%;
      background-repeat: no-repeat;
    }
    &.used{
      background-image: url('~/public/imgs/coupon/used.png');
    }
    &.expire{
      background-image: url('~/public/imgs/coupon/expire.png');
    }
    &.not-used,
    &.used,
    &.expire{
      .center{
        width: 640px;
      }
      .right{
        width: 10px;
      }
    }
    .left,
    .center,
    .right{
      float: left;
      height: 130px;
    }
    .left{
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      position: relative;
      width: 230px;
      padding-bottom: 8px;
      background: linear-gradient(90deg,$lightColor,$mainColor);
      color: #fff;
      &::after{
        display: block;
        content: "";
        position: absolute;
        right: -4px;
        top: 0;
        width: 0;
        height: 130px;
        border-right: 8px dotted #F9F9F9;
      }
    }
    .center{
      width: 530px;
      padding: 10px 10px 10px 20px;
      color: #555;
    }
    .right{
      position: relative;
      width: 120px;
      padding: 5px;
      p{
        line-height: 120px;
        color: $mainColor;
        border-left: 2px dashed #eee;
        text-align: center;
      }
      &:hover{
        p{
          font-weight: bold;
          cursor: pointer;
        }
      }
    }
    .price{
      font-size: 24px;
      &>em{
        font-size: 38px;
        font-weight: bold;
      }
      &+p{
        text-align: center;
      }
    }
    .code,
    .desc{
      &>span{
        display: inline-block;
        width: 70px;
        text-align: justify;
        text-align-last: justify;
        color: #888;
      }
    }
    .name{
      font-size: 16px;
    }
    .code{
      margin: 3px 0;
    }
    .desc{
      position: relative;
      height: 53px;
      overflow: hidden;
      line-height: 1.3;
      padding-left: 71px;
      &>span{
        position: absolute;
        left: 0;
        top: 0;
      }
    }
    button{
      position: absolute;
      right: 20px;
      top: 50%;
      margin-top: -15px;
      display: block;
      padding: 5px 10px;
      font-size: 12px;
      color: $mainColor;
      border: 1px solid $mainColor;
      background-color: #fff;
      &:hover{
        cursor: pointer;
      }
    }
  }
}
// 订单详情 弹窗
.order-modal-detail{
  min-width: 400px;
  max-width: 600px;
  padding: 10px 10px 0;
  h2{
    font-size: 18px;
  }
  h3{
    font-size: 16px;
    color: $mainColor;
  }
  img{
    position: absolute;
    right: 20px;
    top: -4px;
    width: 120px;
    height: 120px;
  }
  .qrcode{
    width: 100%;
    ul{
      margin-bottom: 0;
    }
    li{
      display: table;
      width: 100%;
      margin-bottom: 8px;
      &>div{
        min-width: 40px;
        display: table-cell;
        padding-right: 8px;
        vertical-align: middle;
        &:first-child{
          width: 130px;
        }
        &:nth-child(2){
          width: 140px;
        }
        &:last-child{
          text-align: right;
        }
      }
      span{
        font-size: 18px;
        &:hover{
          cursor: pointer;
          color: $mainColor;
        }
      }
    }
  }
  .qrcode,
  .status,
  .info,
  .contact{
    position: relative;
    padding-bottom: 8px;
    margin-bottom: 15px;
    border-bottom: 1px dashed #ddd;
    color: #333;
  }
  .status,
  .info,
  .contact{
    p{
      margin-bottom: 8px;
    }
    span{
      display: inline-block;
      width: 80px;
      color: #888;
    }
  }
  .info{
    i,em{
      color: $mainColor;
    }
   em{
     font-size: 22px;
     font-weight: bold;
   }
   .price{
     margin-bottom: 5px;
     margin-top: -10px;
   }
  }
  .contact{
    border-bottom: none;
    margin-bottom: 0;
  }
  .pay{
    padding: 20px 0 10px;
    border-top: 1px dashed #ddd;
    button{
      margin-right: 15px;
      padding: 3px 10px;
      background-color: #fff;
      border: 1px solid #d8d8d8;
      border-radius: 3px;
      font-size: 14px;
      color: #777;
      &.pay-btn{
        border-color: $mainColor;
        background-color: $mainColor;
        color: #fff;
      }
      &.cancel{
        color: $mainColor;
        border-color: $mainColor;
      }
      &:hover {
        cursor: pointer;
        opacity: 0.8;
      }
    }
  }
}
.order-qr-img{
  width: 200px;
  img{
    width: 100%;
    height: 200px;
    border: 1px solid #eee;
  }
  p{
    margin-bottom: 0;
    margin-top: 8px;
    text-align: center;
    color: #888;
    font-size: 16px;
  }
}
.order-cancel-reason{
  min-width: 220px;
  padding: 0 10px;
  h4{
    padding: 5px 0;
    font-size: 16px;
    font-weight: bold;
  }
  &>p{
    margin-bottom: 0;
  }
  button{
    margin: 15px 15px 5px 0;
    padding: 3px 20px;
    border-radius: 3px;
    font-size: 14px;
    border: 1px solid $mainColor;
    background-color: $mainColor;
    color: #fff;
    &:hover {
      cursor: pointer;
      opacity: 0.8;
    }
    &[disabled]{
      border-color: #ccc;
      background-color: #CCC;
      &:hover{
        cursor: not-allowed;
      }
    }
  }
}